package com.pureut.storage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pureut.storage.domain.PickingSchemeStrategy;
import com.pureut.storage.mapper.PickingSchemeStrategyMapper;
import com.pureut.storage.service.PickingSchemeStrategyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/***
 *
 * Author:C
 * Date:2022/12/21 17:29
 * @DESC
 */
@Service
public class PickingSchemeStrategyServiceImpl extends ServiceImpl<PickingSchemeStrategyMapper, PickingSchemeStrategy> implements PickingSchemeStrategyService {

    @Resource
    PickingSchemeStrategyMapper pickingSchemeStrategyMapper;

    /**
     * 获取拣货策略分页列表
     * @param id
     * @return
     */
    @Override
    public List<PickingSchemeStrategy> getStrategyList(Long id) {
        List<PickingSchemeStrategy> pickingSchemeStrategies = pickingSchemeStrategyMapper.selectList(new QueryWrapper<PickingSchemeStrategy>().lambda().eq(PickingSchemeStrategy::getPickingId, id).eq(PickingSchemeStrategy::getEnable,1));
        return pickingSchemeStrategies;
    }
}
